package com.ithao.dao;

import com.github.pagehelper.Page;
import com.ithao.pojo.Permission;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @description ：权限Dao
 * @version: 1.0
 */
public interface PermissionDao {
	/**
	 * 根据角色ID，获取权限列表
	 * @param roleId
	 * @return
	 */
	List<Permission> selectPermissionByRoleId(Integer roleId);

	List<Permission> findAll();

	Long countRoleByPermissionId(Integer permissionId);

	void delete(Integer id);

    Page<Permission> selectPage(Map queryParams);

    void insert(Permission permission);
    //删权限角色中间表
    void deleteRoleAndPerByPId(Integer permissionId);

    void update(Permission permission);

    Permission selectById(Integer id);
}
